﻿@using Utry.Framework.Mvc
@model Utry.CI.Models.PlanListModel
@{
    ViewBag.Title = "版本发布计划";
}

<div style="margin-top:60px;">
<form name="form1" method="post" action="@Url.Action("list", "plan")" enctype="multipart/form-data" >

 @Html.JPartial("_Notifications")
<div class="table-toolbar">
    <div class="btn-group">
            <a id="sample_editable_1_new" class="btn btn-sm btn-success"  href="@Url.Action("edit","plan")" >
               添加 <i class="icon-plus"></i>
            </a>
    </div>  
    
        <div class="btn-group">
           	<input type="text" name="PlanCode" id="PlanCode" placeholder="计划编号" value="@Model.PlanCode" class="form-control" style="width:180px;"/>
      </div>
      
      <div class="btn-group">
            <button type="button" class="btn btn-sm btn-success" onclick="query()"><i class="icon-search"></i></button>      </div>                    
</div>

  <table class="table table-striped table-bordered table-hover">
        <thead>
          <tr>
            <th>计划编号</th>
            <th>说明</th>
            <th>开始时间</th>
            <th>结束时间</th>
            <th>状态</th>
            <th>提交计划时间</th>
            <th>提交人</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>

         @foreach (var item in Model.ItemList)
         {
          <tr>
           <td>@item.PlanCode </td>
            <td>@item.Note  </td>
            <td> 
               @item.BeginTime
             </td>
            <td>@item.EndTime</td>
            <td>
            <span class="label label-sm label-success">@item.Status</span>
            </td>
            <td>@item.UpdateTime.ToShortDateString()</td>
            <td>@item.UserName</td>
            <td>
               <div class="btn-group">
                  <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
                    操作 <span class="caret"></span>
                  </button>
                  <ul style="width:50px" class="dropdown-menu"  role="menu">
                    <li style="width:50px"><a href="@Url.Action("edit", "plan", new { Id = item.ID })">修改</a></li>
                 
                    <li style="width:50px"><a href="@Url.Action("delete", "plan", new { Id = item.ID })" onclick="return confirm('确定删除?');">删除</a></li>
                    <li style="width:50px"><a href="@Url.Action("edit", "plan", new { Id = item.ID,act = "view" })">查看</a></li>
                  </ul>
                </div>
             </td>
          </tr>
         }

        </tbody>
      </table>


<div id="pager"><ul class="pagination">@Html.Pager(Model.PageList).ShowIndividualPages(true)</ul> </div>

</form>
</div>

<script type="text/javascript">
    ///全选
    $("#checkAll").click(function () {
        if (this.checked) {
            $("input[name='ItemId']").attr("checked", true);
        } else {
            $("input[name='ItemId']").attr("checked", false);
        }
    });

    //查询
    function query() {
        document.forms[0].action = '@Url.Action("list", "plan")';
        document.forms[0].method = 'post';
        document.forms[0].submit();
    }

</script>

